package bancosys.tec.persist.entities.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;

import jmine.tec.persist.annotation.Alias;

import org.hibernate.annotations.Filter;
import org.hibernate.annotations.FilterDef;
import org.hibernate.annotations.ParamDef;

import bancosys.tec.persist.bussobj.PersistableBusinessObject;

@Entity
@FilterDef(name = ChineseWalledEntity.FILTER_NAME, parameters = { @ParamDef(name = ChineseWalledEntity.PARAMETER_NAME, type = "long") }, defaultCondition = "id in (:allowedIds)")
@Filter(name = ChineseWalledEntity.FILTER_NAME)
@Alias(value = "chwent")
@SequenceGenerator(name = "SEQ_CHINESE_WALLED_ENTITY", sequenceName = "SEQ_CHINESE_WALLED_ENTITY")
public class ChineseWalledEntity extends PersistableBusinessObject {

    public static final String FILTER_NAME = "chineseWallTest";

    public static final String PARAMETER_NAME = "allowedIds";

    private Long id;

    private String name;

    /**
     * @return the id
     */
    @Id
    @Column(name = "id")
    @SequenceGenerator(sequenceName = "SEQ_CHINESE_WALLED_ENTITY", name = "SEQ_CHINESE_WALLED_ENTITY")
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_CHINESE_WALLED_ENTITY")
    public Long getId() {
        return this.id;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the name
     */
    public String getName() {
        return this.name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }
}
